<template>
  <a-comment v-if="!item.children">
    <template #actions>
      <span key="comment-nested-reply-to">{{ item.actions }}</span>
    </template>
    <template #author>
      <a>{{ item.id }}{{ item.author }}</a>
    </template>
    <template #avatar>
      <a-avatar :src="item.avatar.src" :alt="item.avatar.alt" />
    </template>
    <template #content>
      <p>
        {{ item.content }}
      </p>
    </template>
  </a-comment>
  <a-comment v-else>
    <template #actions>
      <span key="comment-nested-reply-to">{{ item.actions }}</span>
    </template>
    <template #author>
      <a>{{ item.id }}{{ item.author }}</a>
    </template>
    <template #avatar>
      <a-avatar :src="item.avatar.src" :alt="item.avatar.alt" />
    </template>
    <template #content>
      <p>
        {{ item.content }}
      </p>
    </template>
    <commentTree :item="item1" v-for="item1 in item.children" :key="item1.id">
    </commentTree>
  </a-comment>
</template>
<script>
export default {
  props: {
    item: {
      type: Object,
    },
  },
};
</script>
